const express = require("express");
const settingServ = require("../services/settingService");
const getSendData = require("../utils/getSendData");

const router = express.Router();

router.get("/", async (req, res, next) => {
    res.send(getSendData(await settingServ.getSetting()));
});

router.put("/", async (req, res, next) => {
    res.send(await settingServ.setSetting(req.body));
});

module.exports = router;
